define([
  'Handlebars'
], function(Handlebars){
  function format_date(long_date, format) {
	var date = new Date(Number(long_date));
    var day = zp(date.getDate());
    var month = zp(date.getMonth() + 1);
    var year = date.getFullYear();
    var hours = zp(date.getHours());
    var minutes = zp(date.getMinutes());
    return day + "/" + month  + " , " + hours + ":" + minutes;
  }
  
  function zp(n){
	  return n<10?("0"+n):n;
  }
  
  Handlebars.registerHelper('format_date', format_date);
  
  return format_date;
});